package com.cskaoyan.filter;

import org.springframework.web.filter.OncePerRequestFilter;

import javax.servlet.FilterChain;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;

/**
 * @author stone
 * @date 2022/09/03 09:51
 */
public class FirstFilter extends OncePerRequestFilter {
    @Override
    protected void doFilterInternal(HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse, FilterChain filterChain) throws ServletException, IOException {
        // 和你之前在Filter接口中的doFilter方法中做的业务是一样的
        System.out.println("hello filter");
        filterChain.doFilter(httpServletRequest,httpServletResponse);
    }
}
